package cn.llyong.rpc.client.netty;

import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description:
 * @author: lvyong
 * @date: 2020年06月30日 08:56
 */
@Configuration
public class NettyConfig {

    @Bean
    public GenericObjectPoolConfig poolConfig() {
        GenericObjectPoolConfig config=new GenericObjectPoolConfig();

        //最大活跃数
        config.setMaxIdle(10);
        //最小活跃数
        config.setMinIdle(1);
        //最大总数
        config.setMaxTotal(100);
        return config;
    }
}
